package com.swpu.cbg.photodemo;

import android.app.Activity;
import android.content.Context;

import me.nereo.multi_image_selector.MultiImageSelectorActivity;

/**
 * Created by chenboge on 16/3/3.
 */
public class SelectImageUtil {

    public static Builder Builder;

    public void startActivity(Context context){
        MultiImageSelectorActivity.startSelect((Activity) context,Builder.REQUEST_IMAGE,Builder.maxNum,Builder.selectedMode);
    }


    public static Builder newBuilder() {
        Builder = new Builder();
        return  Builder;
    }


    public static class Builder{

        public static final int SINGLE = 0;
        public static final int MUTILE = 1;

        public int REQUEST_IMAGE = 2;

        public int selectedMode=MUTILE;

        public int maxNum = 9;

        public Builder setREQUEST_IMAGE(int REQUEST_IMAGE) {
            this.REQUEST_IMAGE = REQUEST_IMAGE;
            return Builder;
        }

        public Builder setSelectedMode(int selectedMode) {
            this.selectedMode = selectedMode;
            return Builder;
        }

        public Builder setMaxNum(int maxNum) {
            this.maxNum = maxNum;
            return Builder;
        }

        public SelectImageUtil Builder() {
            return new SelectImageUtil();
        }
    }

}
